/**
 * @Copyright:Copyright (c) 2018 - 2100
 * @Company:gome
 */

package com.gome.gop.common;

import org.springframework.util.StringUtils;

import com.gome.gop.common.exception.BussinessException;

/**
 * @Title:
 * @Description:国美数据判断
 * @Author:chengcheng7
 * @Since:2020年3月27日 上午11:25:22
 * @Copyright:Copyright (c) 2018 - 2100
 * @Company:gome
 * @Version:1.1.0
 */

public class GomeAssert {
    
    /**
     * 
     * @param text
     * @param message
     * @Description:判断字符串是否为空
     */
    public static void hasLength(String text, String message) {
        if (!StringUtils.hasLength(text)) {
            throw new BussinessException(message);
        }
    }
    
    public static void isTrue(boolean expression, String message) {
        if (!expression) {
            throw new BussinessException(message);
        }
    }
    
}
